<script>
	export default {
		onLaunch: function() {
			// 获取导航高度
			this.$store.commit('NAVIGATION_INFO')
			
			// uni.getLocation({
			//     type: 'wgs84',
			// 	geocode: true,
			//     success: function (res) {
			// 		uni.setStorageSync('getLocation', res)
			//     }
			// });
			
			
			// #ifdef APP-PLUS
			// 检测升级
			uni.request({
			    url: 'https://uniapp.dcloud.io/update', //检查更新的服务器地址
			    data: {
			        appid: plus.runtime.appid,
			        version: plus.runtime.version,
			        imei: plus.device.imei
			    },
			    success: (res) => {
			        if (res.statusCode == 200 && res.data.isUpdate) {
			            let openUrl = plus.os.name === 'iOS' ? res.data.iOS : res.data.Android;
			            // 提醒用户更新
			            uni.showModal({
			                title: '更新提示',
			                content: res.data.note ? res.data.note : '是否选择更新',
			                success: (showResult) => {
			                    if (showResult.confirm) {
			                        plus.runtime.openURL(openUrl);
			                    }
			                }
			            })
			        }
			    }
			})
			// #endif
			
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		},
		globalData: {  
			city: '南宁'  
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "uview-ui/index.scss";
	@import "@/assets/style/hami.scss";
</style>
